package Java;

import java.util.Scanner;

public class work49 {
	public static void main(String[] args){
		String str = "asjadnebcecasnkfhadneuf";
		String fstr = "ad";
		int count = 0;
		for( int i=0;i<=str.length()-fstr.length();i++){
			if(str.substring(i,i+fstr.length()).equals(fstr)){
				count++;
			}
		}
		System.out.println(count);
	}
}
